body {
  background: #ffffff;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

.carousel {
  margin-bottom: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel-inner {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel-inner > .item {
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
}

.carousel .item {
  height: 400px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.item {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 4px;
  overflow: hidden;
}

.carousel-caption {
  position: absolute;
  right: 15%;
  bottom: 20px;
  left: 15%;
  z-index: 10;
  padding-top: 20px;
  padding-bottom: 20px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
  width: 70%;
  margin: 0 auto;
}

/* 轮播图指示器样式 */
.carousel-indicators {
  bottom: 20px;
  z-index: 15;
}

.carousel-indicators li {
  background-color: rgba(255, 255, 255, 0.3);
  border: 2px solid #fff;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-indicators li:hover {
  background-color: #ff4444;
  border-color: #ff4444;
  transform: scale(1.2);
}

.carousel-indicators .active {
  background-color: #ff0000 !important;
  border-color: #ff0000 !important;
  transform: scale(1.3);
}

/* 轮播图鼠标悬浮滑动效果 */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  transition: transform 0.6s ease-in-out;
}

.carousel:hover .carousel-inner {
  cursor: grab;
}

.carousel:active .carousel-inner {
  cursor: grabbing;
}

.item1 {
  background-image: url(../img/other/csdn-bg.jpg);
}

.item2 {
  background-image: url(../img/other/juejin-bg.jpg);
}

.item3 {
  background-image: url(../img/other/leetcode-bg.jpg);
}

.txt {
  text-align: left;
  position: absolute;
  bottom: 40px;
}

.txt p{
  width: 260px;
  font-size: 15px;
}

.container h1 {
  text-align: left;
  margin-left: 20px;
  color: #333333;
  margin-top: 40px;
  font-size: 28px;
  font-weight: bold;
}

.hr1 {
  border:0;
  background-color:#a2a2a2;
  height:1px;
  margin: 20px 0 30px 20px;
}

.row a {
  color: #fff;
}

.box-bottom {
  font-size: 30px;
  box-shadow: 5px 5px 5px rgb(140, 160, 180);
  width: 90%;
  position: relative;
  margin-left: 5%;
  overflow: hidden;
  margin-top: 25px;
  margin-bottom: 25px;
  background-color: #ffffff;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 350px;
  display: flex;
  flex-direction: column;
}

.box-bottom:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.img-top {
  width: 100%;
  position: absolute;
  top: 0;
  overflow: hidden;
}

.box-bottom p {
  position: relative;
  top: -60px;
  font-size: 15px;
  width: 100%;
  color: #fff;
  background-color: rgba(0,0,0,0.6);
  opacity: 0;
  transition-duration: 0.4s;
  padding: 15px;
  margin: 0;
}

.btn-work {
  padding: 15px;
  background-color: #f8f9fa;
  color: #333;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  position: relative;
}

.btn-work h3 {
  color: #333;
  font-size: 20px;
  font-weight: bold;
  margin: 0 0 10px 0;
  text-align: left;
}

.btn-work h4{
  display: inline-block;
  color: #333;
  font-size: 14px;
  margin: 0;
  flex: 1;
  text-align: left;
  font-weight: normal;
}

.btn-work a {
  display: inline-block;
  float: right;
  margin-left: 165px;
  color: #fff !important;
  padding: 4px 8px;
  border-radius: 3px;
  text-decoration: none;
  font-size: 13px;
  background-color: #17a2b8;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 35px;
  text-align: center;
}

.btn-work a:hover {
  background-color: #138496;
  color: #fff !important;
  text-decoration: none;
}

#box1:hover #box1-p {
  top:0;
  opacity: 1;
}

#box2:hover #box2-p {
  top:0;
  opacity: 1;
}

#box3:hover #box3-p {
  top:0;
  opacity: 1;
}

#box4:hover #box4-p {
  top:0;
  opacity: 1;
}

#box5:hover #box5-p {
  top:0;
  opacity: 1;
}

#box6:hover #box6-p {
  top:0;
  opacity: 1;
}

#box7:hover #box7-p {
  top:0;
  opacity: 1;
}

#box8:hover #box8-p {
  top:0;
  opacity: 1;
}

#box9:hover #box9-p {
  top:0;
  opacity: 1;
}

.about-us {
  text-align: center;
  height: auto;
  margin-top: 50px;
  margin-bottom: 50px;
}

.btn-l {
  width: 70%;
  color: #ffffff;
  text-decoration: none;
  background-color: #0082ec;
  font-size: 15px;
  box-shadow: 0px 5px 8px #055ca3;
  margin: 20px auto;
  padding: 15px;
  border-radius: 5px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.btn-l:hover {
  background-color: #0066cc;
  color: #ffffff;
  text-decoration: none;
}

/* 图片自适应样式 */
.box-bottom img {
  max-width: 100%;
  height: 200px;
  width: 100%;
  display: block;
  margin: 0;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 4px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

/* 轮播图响应式设计 */
@media (max-width: 768px) {
  .carousel .item {
    height: 300px;
    padding: 15px;
  }
  
  .container h1 {
    text-align: center;
    margin-left: 0;
    color: #333333;
  }
  
  .box-bottom {
    width: 95%;
    margin-left: 2.5%;
    height: 320px;
  }
  
  .box-bottom img {
    height: 150px;
    padding: 15px;
  }
  
  .btn-work {
    min-height: 100px;
  }
  
  .btn-work a {
    padding: 3px 6px;
    font-size: 9px;
    background-color: #17a2b8;
    margin-right: 12px;
    min-width: 30px;
  }
  
  .txt p {
    width: 200px;
    font-size: 13px;
  }
  
  .btn-l {
    width: 90%;
  }
}

@media (max-width: 480px) {
  .carousel .item {
    height: 250px;
    padding: 10px;
  }
  
  .txt {
    bottom: 20px;
  }
  
  .txt p {
    width: 150px;
    font-size: 12px;
  }
  
  .box-bottom {
    height: 280px;
  }
  
  .box-bottom img {
    height: 120px;
    padding: 10px;
  }
  
  .btn-work {
    min-height: 80px;
  }
  
  .btn-work a {
    padding: 2px 4px;
    font-size: 8px;
    background-color: #17a2b8;
    margin-right: 10px;
    min-width: 25px;
  }
  
  .btn-work a:hover {
    background-color: #138496;
  }
}
